package com.zlb.app.modules.dict.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zlb.app.common.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * @Desc 字典表 实体类
 * @Author zWX1367238
 * @Date 2024-08-20 14:27:31
 */
@Data
@TableName("dict")
@ApiModel("字典表实体类")
public class Dict extends BaseEntity implements Serializable {

    private static final long serialVersionUID = -95571305614034975L;

    @TableId(type = IdType.AUTO)
    @ApiModelProperty("主键ID")
    private Long id;

    @ApiModelProperty("父ID")
    private Long parentId;

    @ApiModelProperty("类型(可省略,根据类型查询,同一层级且同父ID,type一致)")
    private String dictType;

    @ApiModelProperty("字典名称")
    private String dictLabel;

    @ApiModelProperty("字典值")
    private String dictValue;

    @ApiModelProperty("字典排序")
    private Integer dictSort;

    @ApiModelProperty("描述")
    private String descriptions;

    @ApiModelProperty("是否启用 0是,1否")
    private Integer isEnable;

    @ApiModelProperty("等级")
    private Integer level;

    @ApiModelProperty("子元素集合")
    @TableField(exist = false)
    private List<Dict> childList;

}
